package org.gameg.Api.controller;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.gameg.Api.util.ConfigProperty;
import org.gameg.model.biz.TGame;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

@Controller
@RequestMapping("/testController")
//@PropertySource("classpath:property.properties")
public class TestController {
    @Autowired
    private TGame tGame;

    /*@Value("${1}")
    private String  name;*/
    @RequestMapping("/test")
    @ResponseBody
    public String test() throws IOException {
        String jsonStr = "{\"1\":\"1111\"}";
        ConfigProperty.savePropertise(jsonStr);
        return tGame.getGameType();
    }

}
